{% extends "sphene/sphboard/base.html" %}

{% block content %}
  <script language="JavaScript" type="text/javascript" src="/static/sphene/community/xmlhttp.js"></script>
  <script language="JavaScript" type="text/javascript">
  <!--
   function doPreview() {
     showResponseInElement( 'previewarea', 'Loading Preview ....', "type=preview&body=" + escape( document.snipedit.body.value ) );
   }
  //-->
  </script>

  {% include "sphene/sphwiki/_snip_header.html" %}
  <a href="{{ snip.get_absolute_url }}">Back to Snip</a><br/><br/>
  <div id="previewarea" style="display:none; visibility:hidden; border: 2px solid gray; overflow:scroll; max-height: 500px; padding: 5px;"></div>

  <form action="." method="post" name="snipedit" class="sphform">
    <table class="form">
      {{ form }}
      <tr>
        <td><label for="message_id">Change Message:</label></td><td><input type="text" name="message" id="message_id" /></td>
      </tr>
   </table>
   <input type="submit" value="Save" /> * <input type="button" value="Preview" onclick="javascript:doPreview()" />
  </form>
  <br/>
  See <a href="http://sct.sphene.net/wiki/show/WikiDocumentation/" target="_blank">WikiDocumentation</a> on how to format your input.
{% endblock %}
